Introduction

In this project we want to investigate the correlation between the diets and beak measurements of birds and to figure out if you can predict a bird’s diet based on their beak measurements alone.

The Bird Beak

Bird beak anatomy can vary greatly in size and shape depending on habitat and diet (1). e.g.

  • Cone Shape: Picking up and cracking seeds easily.

  • Broader/Flatter: Larger surface area for bug catching in the air.

  • Tweezer-like: Bug eating off the ground.

  • Strong with Downward Point: Hooking onto meat easier.

  • Long/Thin & Spear-like Tip: Fish Catching.

Bird beak anatomy is shown in figure 1.

figure 1: Bird Beak Anatomy

figure 1: Bird Beak Anatomy

The Diets of Birds

The different diets of birds are sorted into different trophic levels. A trophic level defines an organism’s hierarchy in a ecosystem. The main three trophic levels are carnivores (eating >70% meat), omnivores (eating equal amounts of plants & meat) and herbivores (eating >70% plants).

We’ve left out scavenger birds since they make up <1% of our data, so using them may lead to false predictions.

The main trophic levels can be sub-categorised into niche trophics. Within these categories we found there to be a clearer link between the beak measurements and diets therefore we looked at the most common one, invertivores, to make our model.

In order to be categorised as one the following trophic levels the species must get at least 60% of its diet from the corresponding food resource:

Trophic Niche Diet Description
Frugivore Fruit
Granivore Seeds or Nuts
Nectarivore Nectar
Herbivore Plant Materials in Non-Aquatic Systems; i.e. leaves, buds, whole flowers etc.
Herbivore Aquatic Plant Materials in Aquatic Systems; i.e. algae and aquatic plant leaves
Invertivore Invertebrate Animals in Terrestrial Systems; i.e. insects, worms, arachnids, etc.
Vertivore Vertebrate Animals in Terrestrial Systems; i.e. mammals, birds, reptiles etc.
Aquatic Predator Vertebrate & Invertebrate Animals in Aquatic Systems; i.e. fish, crustacea, molluscs, etc.
Scavenger Carrion (Dead Animal Corpses), Offal or Refuse
Omnivore Species using multiple niches, within or across trophic levels, in relatively equal proportions

Our Data

Our main data set is the AVONET Supplementary Data Set called “birds_data” (2). It contains different bird species measurements and behavior; i.e. their habitat, diet and migration patterns.

The following variables are to be useful in our project:

  • Beak Length: The nares length is measured from the front edge of the nostril to the tip of the beak (see fig 2). We’ve chosen to focus on nares length over culmen length as beak width and depth also refers to the nostril location, whereas the culmen length refers to the skull.

  • Beak Width: Width of the beak at the front edge of the nostrils (see fig 2).

  • Beak Depth: Depth of the beak at the front edge of the nostrils (see fig 2).

  • General Trophic: Main diet level groups (Carnivore, Omnivore, Herbivore, Scavenger)

  • Niche Trophic: Niche diet level, sub categories of Tropic Level groups.

figure 2: Bird Measurements Taken

figure 2: Bird Measurements Taken

Methods

Data Tidying

In order to tidy our original data set we checked for official NAs and located them, selected our required columns to reduce the variable amount, then renamed and reordered the columns to keep them clean and making sense.

Data Science Techniques

During our project we have used a multitude of data science techniques. The main ones we have used are as follows:

  • We have tidied and wrangled the data in order to make it clear and concise for analysing.

  • We have imported the original data set and transcribed it into csv format to make it easy for us to read.

  • For data visualisation we have created many graphs to demonstrate our findings and data.

  • For our model, we’re using logistic regression as we’re predicting a catagorical value.

Results

The Investigation Process

General Trophic Level

The trophic levels don’t have equal amounts of data, generally the carnivores have many more entries compared to any other column. We don’t believe this is due to sampling bias, just due to the fact there are likely more carnivore species of bird in existence compared to others.

When investigating the beak data, there are three variables to consider; beak length (nares), beak width and beak depth.

Summarising the data from these 3 columns we get:

##  Beak_Nares_Length   Beak_Width       Beak_Depth    
##  Min.   :  1.60    Min.   : 0.700   Min.   :  1.00  
##  1st Qu.:  8.50    1st Qu.: 3.600   1st Qu.:  3.80  
##  Median : 11.70    Median : 5.000   Median :  5.80  
##  Mean   : 17.06    Mean   : 6.579   Mean   :  8.06  
##  3rd Qu.: 18.00    3rd Qu.: 7.700   3rd Qu.:  9.40  
##  Max.   :389.80    Max.   :88.900   Max.   :110.90

We can visualise these values in a box plot whilst separating them into their respective General trophic levels:

Discounting the limited data for scavenger birds, these box plots shows that beak measurements don’t differ greatly between trophic levels on average.

Niche Trophic Level

As from above you can see that there wasn’t a clear distinction of the bird measurements between different general trophic levels. So we decided to have a look at the niche trophic levels.

The trophic with the least varied measurements across the beak are the nectarivores whereas the trophics with the most variation are the aquatic predators, scavengers, omnivores and herbivore terrestrials. This makes sense as nectarivores have a very niche diet, only really consisting of nectar, compared to the much more varied diet of scavengers and omnivores. This shows that a more varied diet creates higher beak size variation across the trophic levels.

The following graph summaries these mean beak data sets into values for each niche trophic level:

This further shows how birds with more variation in their diets have a higher variation of beak sizes and shapes.

This pie chart shows the proportion of niche trophics our data includes:

The majority of our trophic niche data is the invertivores, so we will be using that data for our model.

Modelling the Data

In order to answer our question of is it possible to predict diet based on beak measurements, we will need to use a logistic regression model since this is a discrete variable case.

Our first model, model-I1, uses only beak depth as a predictor value to predict whether the bird is an invertivore or not. We then made a second model, model-I for invertivores that uses all 3 predictor values (beak length, width and depth).

Here is the tidy model of model-I1, using 1 variable:

## # A tibble: 2 × 5
##   term              estimate std.error statistic   p.value
##   <chr>                <dbl>     <dbl>     <dbl>     <dbl>
## 1 (Intercept)         0.809    0.0434       18.7 1.13e- 77
## 2 Beak_Nares_Length  -0.0579   0.00272     -21.3 1.02e-100

Here is the birds_fit_I1 model equation:

\[\log_{e}(\frac{p_{i}}{1-p_{i}}) = 0.809 - 0.058(Beak Nares Length)\]

Here is the tidy model of model-I, using 3 variables:

## # A tibble: 4 × 5
##   term              estimate std.error statistic   p.value
##   <chr>                <dbl>     <dbl>     <dbl>     <dbl>
## 1 (Intercept)         1.17     0.0490      23.9  2.84e-126
## 2 Beak_Nares_Length  -0.0157   0.00292     -5.37 7.95e-  8
## 3 Beak_Width          0.151    0.0140      10.8  4.08e- 27
## 4 Beak_Depth         -0.271    0.0127     -21.2  3.40e-100

Here is the birds_fit_I model equation:

\[\log_{e}(\frac{p_{i}}{1-p_{i}}) = 1.171 - 0.016(Beak Nares Length) + 0.151(Beak Width) - 0.271(Beak Depth)\]

The ROC of models I1 and 1 are below:

Regarding the area under the curve, model I1 has a value of 0.6806375 whereas model I has a value of 0.7395973.

Both values are above 0.5 which shows that both models are better than random chance but since model I has a higher area, it is considered the better model.

Discussion

Advantages

In terms of context, researchers probably have a similar model or method so that they can tell what birds eat without observation e.g looking at bones. This is similar to how they do this with fossils.

The thought behind out model is that bird beaks have evolved and taken on different beak shapes to best eat there chosen food type. Models like this could be used in conjunction with other methods.

Limitations

The model is binomial so can only predict success or failure for one food type. It can’t predict from a wide variety of varying trophics.

The model also isn’t perfect and would be better if it was within a certain range or proportion e.g beak width in proportion to beak length could provide more accurate results.

The following table shows the cutoff percentage at 40%, as you can see there are a lot of false positives:

Bird is not Invertivore Bird is Invertivore
Bird labelled Invertivore 932 688
Bird labelled not Invertivore 117 463
Bird is not Invertivore Bird is Invertivore
Bird labelled Invertivore 1000 978
Bird labelled not Invertivore 49 173

References

1 (Burleydam garden Centre):

2 (BirdLife 2020):

Figure 1:

Figure 2: